

package controller.action;


import java.io.File;
import java.io.IOException;

import model.service.FileService;

import com.opensymphony.xwork2.ActionSupport;

public class FileUpload extends ActionSupport{
	private FileService fileService;
	public FileService getFileService() {
		return fileService;
	}
	public void setFileService(FileService fileService) {
		this.fileService = fileService;
	}
	public String getFileFileContentType() {
		return fileFileContentType;
	}
	public void setFileFileContentType(String fileFileContentType) {
		this.fileFileContentType = fileFileContentType;
	}
	private String userName;
	private  File file;
	private String fileFileContentType;  
	private String fileFileName; 
	private String result;
	public String upload() throws IOException
	{
		System.out.println(fileFileName);
		result = fileService.fileUplad(file, fileFileName, userName);
		System.out.println(result);
		return SUCCESS;
	}
	
	public File getFile() {
		return file;
	}
	public void setFile(File file) {
		this.file = file;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getFileFileName() {
		return fileFileName;
	}
	public void setFileFileName(String fileFileName) {
		this.fileFileName = fileFileName;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}

}
